﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/styles/layout.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/styles/wysiwyg.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")"></script>
    <script type="text/javascript" src="http://dwpe.googlecode.com/svn/trunk/shared/EnhanceJS/enhance.js"></script>
    <script type="text/javascript" src='http://dwpe.googlecode.com/svn/trunk/charting/js/excanvas.js'></script>
    <script type="text/javascript" src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js'></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/adminJs/jquery.wysiwyg.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/adminJs/visualize.jQuery.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/adminJs/functions.js")"></script>
    <!-- Theme Start -->
    <link href="@Url.Content("~/Content/themes/blue/styles.css")" rel="stylesheet" type="text/css" />
    <!--<link href="themes/green/styles.css" rel="stylesheet" type="text/css" />-->
    <!-- Theme End -->
    <!-- START SwfUpload -->
    <!--
    <link href="@Url.Content("~/Scripts/JqueryUI/css/start/jquery-ui-1.8.13.custom.css")" rel="stylesheet" type="text/css" />
    -->
    <script src="@Url.Content("~/Scripts/JqueryUI/jquery-ui-1.8.13.custom.min.js")" type="text/javascript"></script>
    @RenderSection("Head", false)
    <!-- END SwfUpload -->
    <!-- START Ckeditor  -->
    <script type="text/javascript" src="@Url.Content("~/ckeditor/ckeditor.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/ckfinder/ckfinder.js")"></script>
    <!-- END Ckeditor  -->
</head>
<body id="homepage">
    <div id="header">
        <a href="" title="">
            <img src="@Url.Content("~/Content/img/logo_a.png")" alt="Control Panel" class="logo" /></a>
        <div id="searcharea">
            @using (Html.BeginForm("Search", "Manager", FormMethod.Post))
            {
                <input type="text" class="searchbox" value="Search control panel..." onclick="if (this.value =='Search control panel...'){this.value=''}" />
                <select id="SearchType">
                    <option value="0" selected="selected">-选择类型-</option>
                    <option value="1">文档</option>
                    <option value="2">知识</option>
                    <option value="3">商品</option>
                </select>
                <input type="submit" value="Search" class="searchbtn" />
            }
        </div>
    </div>
    <!-- Top Breadcrumb Start -->
    <div id="breadcrumb">
        <ul>
            <li>
                <img src="@Url.Content("~/Content/img/icons/icon_breadcrumb.png")" alt="Location" /></li>
            <li><strong>当前位置:</strong></li>
            <li><a href="@Url.Action("Index", "Home")" title=""><strong>首页</strong></a></li>
            <li>\</li>
            <li><a href="@Url.Action("Index", "Zone")" title="">MySpace</a></li>
        </ul>
    </div>
    <!-- Top Breadcrumb End -->
    <!-- Right Side/Main Content Start -->
    <div id="rightside">
        @RenderBody()
        <div id="footer">
            &copy; Copyright 2013 SenNan
        </div>
    </div>
    <!-- Right Side/Main Content End -->
    <!-- Left Dark Bar Start -->
    <div id="leftside">
        <div class="user">
            @{
                KnowledgeCommunity.Web.Models.CKCDB mydb = new KnowledgeCommunity.Web.Models.CKCDB();

                string imgUrl = (from n in mydb.UserAccounts
                                 where n.UserName == HttpContext.Current.User.Identity.Name
                                 select n.ImgUrl).FirstOrDefault();
                if (imgUrl != "" || imgUrl != null)
                {
                <a href="@Url.Action("UserInfo", "Account")">
                    <img src="@Url.Content(imgUrl)" width="44" height="44" class="hoverimg" />
                </a>
                }
                else
                {
                <a href="@Url.Action("UserInfo", "Account")">
                    <img src="@Url.Content("~/Content/img/avatar.png")" width="44" height="44" class="hoverimg" />
                </a>
                }
            }
            <p class="username">
                Hi ! @HttpContext.Current.User.Identity.Name</p>
            <p class="userbtn">
                <a href="@Url.Action("UserInfo", "Account")" title="">配置</a></p>
            <p class="userbtn">
                <a href="@Url.Action("LogOff", "Account")" title="">注销</a></p>
        </div>
        <div class="notifications">
            <p class="notifycount">
                <a href="" title="" class="notifypop">10</a></p>
            <p>
                <a href="" title="" class="notifypop">待处理信息</a></p>
            <p class="smltxt">
                (Click to open notifications)</p>
        </div>
        <ul id="nav">
            <li>
                <ul class="navigation">
                    <li class="heading selected">工作列表</li>
                    @{
                        if (HttpContext.Current.User.IsInRole("editor") || HttpContext.Current.User.IsInRole("admin"))
                        {
                        <li><a href="@Url.Action("Waiting", "Zone")" title="">待审批</a></li>
                        <li><a href="@Url.Action("Approved", "Zone")" title="">已通过</a></li>
                        <li><a href="@Url.Action("Canceled", "Zone")" title="">已撤销</a></li>
                        }
                        else
                        {
                        <li><a href="@Url.Action("Create", "Document")" title="">共享我的文档</a></li>
                        <li><a href="@Url.Action("Create", "Knowledge")" title="">共享我的知识</a></li>
                        <li><a href="@Url.Action("Create", "Tribune")" title="">创建我的论坛</a></li>
                        <li><a href="@Url.Action("Create", "Commodity")" title="">发布我的商品</a></li>
                        <li><a href="@Url.Action("Create", "Trouble")" title="">提出我的问题</a></li>
                        }
                    }
                </ul>
            </li>
            @{
                if (HttpContext.Current.User.IsInRole("admin"))
                {
                <li><a class="collapsed heading">系统管理</a>
                    <ul class="navigation">
                        <li><a href="http://localhost:12997/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=E:\tfs\Web\KnowledgeCommunity\KnowledgeCommunity.Web&applicationUrl=/"
                            title="">系统管理</a></li>
                        <li><a href="@Url.Action("Index", "Account")" title="">用户列表</a></li>
                    </ul>
                </li>
                }

                if (HttpContext.Current.User.IsInRole("editor") || HttpContext.Current.User.IsInRole("admin"))
                {
                <li><a class="collapsed heading">新闻管理</a>
                    <ul class="navigation">
                        <li><a href="@Url.Action("List", "Topic")" title="" class="likelogin">新闻列表</a></li>
                        <li><a href="@Url.Action("Create", "Topic")" title="">添加新闻</a></li>
                    </ul>
                </li>
                <li><a class="expanded heading">Slider管理</a>
                    <ul class="navigation">
                        <li><a href="@Url.Action("List", "Slider")" title="">Slider列表</a></li>
                        <li><a href="@Url.Action("Create", "Slider")" title="">添加Slider</a></li>
                    </ul>
                </li>
                <li><a class="expanded heading">知识管理</a>
                    <ul class="navigation">
                        <li><a href="@Url.Action("List", "Knowledge")" title="">知识列表</a></li>
                        <li><a href="@Url.Action("List", "Tribune")" title="">论坛列表</a></li>
                        <li><a href="@Url.Action("Create", "Knowledge")" title="">添加知识</a></li>
                        <li><a href="@Url.Action("Create", "Tribune")" title="">创建论坛</a></li>
                    </ul>
                </li>
                <li><a class="expanded heading">文档管理</a>
                    <ul class="navigation">
                        <li><a href="@Url.Action("List", "Document")" title="">文档列表</a></li>
                        <li><a href="@Url.Action("Create", "Document")" title="">添加文档</a></li>
                    </ul>
                </li>
                <li><a class="expanded heading">商品管理</a>
                    <ul class="navigation">
                        <li><a href="@Url.Action("List", "Commodity")" title="">商品列表</a></li>
                        <li><a href="@Url.Action("Create", "Commodity")" title="">添加商品</a></li>
                    </ul>
                </li>
                }
            }
            <li>
                <ul class="navigation">
                    <li class="heading selected">MySpace</li>
                    <li><a href="@Url.Action("MyDocument", "Zone")" title="">我的文档</a></li>
                    <li><a href="@Url.Action("MyKnowledge", "Zone")" title="">我的知识</a></li>
                    <li><a href="@Url.Action("MyCommodity", "Zone")" title="">我的商品</a></li>
                    <li><a href="@Url.Action("MyTribune", "Zone")" title="">我的论坛</a></li>
                    <li><a href="@Url.Action("MyTrouble", "Zone")" title="">我的问题</a></li>
                    <li><a href="@Url.Action("MyAttention", "Zone")" title="">我的关注</a></li>
                    <li><a href="@Url.Action("OrderList", "Zone")" title="">订单管理</a></li>
                    <li><a href="@Url.Action("MyOrder", "Zone")" title="">我的订单</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!-- Left Dark Bar End -->
    <!--[if IE 6]>
    <script type='text/javascript' src='scripts/png_fix.js'></script>
    <script type='text/javascript'>
      DD_belatedPNG.fix('img, .notifycount, .selected');
    </script>
    <![endif]-->
</body>
</html>
